cmake_minimum_required(VERSION 3.15)

project(Image_Engineering_Course)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

IF (WIN32)
	MESSAGE(STATUS "Now is windows")
	set(PYTHONHOME C:/Users/南澈/AppData/Local/Programs/Python/Python36)

	include_directories(${PYTHONHOME}/include)
	include_directories(${PYTHONHOME}/Lib/site-packages/numpy/core/include)
	link_directories(${PYTHONHOME}/libs)
	#####
	set(OpenCV_DIR F:/software/Opencv/opencv/build/x64/vc15/lib)
ELSEIF (UNIX)
	MESSAGE(STATUS "Now is UNIX-like OS's.")

	find_package(PythonLibs 2.7)
	add_executable(simple_test src/simple_test.cpp)
	target_include_directories(simple_test PRIVATE ${PYTHON_INCLUDE_DIRS})
	target_link_libraries(simple_test ${PYTHON_LIBRARIES})
	include_directories(/usr/local/lib/python2.7/dist-packages/numpy/core/include)

	set(OpenCV_DIR /home/nc/download/opencv/opencv-3.4.2/build)
ENDIF ()


find_package(OpenCV REQUIRED)

# set(OpenCV_FOUND 1)
include_directories(${OpenCV_INCLUDE_DIRS})

include_directories(include)

add_executable(Main src/ostu/main.cpp src/ostu/ostu.cpp)

link_directories(${OpenCV_LIBRARY_DIRS})

target_link_libraries(Main ${OpenCV_LIBS})

add_definitions(-DMATPLOTLIBCPP_PYTHON_HEADER=Python.h)